Hello. I've been trying this for a while now, following a few different tutorials and and forum threads. It seems like a simple but i just cannot get the any data from textarea. Input type "name" & "mail" is Ok, it's working. I'll paste my php coding and my form below. Any help would be much appreciated. Thanks. <section id="forma" > <div class="container"> <div class="row"> <div class="col-md-12 text-center"> <form action="send.php" method="post" enctype="multipart/form-data" id="form_page"> <input type="text" name="name" placeholder="Name" required> <input type="email" name="mail" placeholder="E-mail" required> <textarea name="comment" id="comment" style="margin: 0px 15px -33px 0px; width: 307px; height: 66px;"></textarea><br> <label class="uploadbutton"> <div class="button" ></div> <div class='input'></div> <input type="file" name="file" onchange="this.previousSibling.previousSibling.innerHTML = this.value"/> </label> <button type="submit" class="btn btn2"></button> </form> </div> </div> </div> </section> <?php require_once('phpmailer/PHPMailerAutoload.php'); $mail = new PHPMailer; $mail->CharSet = 'utf-8'; $name = $_POST['name']; $phone = $_POST['phone']; $email = $_POST['mail']; $text = $_POST['message']; $comment = $_POST['comment']; $mail->SMTPDebug = 3; //$mail->isSMTP(); //$mail->Host = ''; //$mail->SMTPAuth = true; //$mail->Username = ''; //$mail->Password = ''; //$mail->SMTPSecure = 'ssl'; //$mail->Port = 587; $mail->setFrom(''); $mail->addAddress(''); //$mail->addAddress(''); //$mail->addReplyTo('', 'Information'); //$mail->addCC('cc@example.com'); //$mail->addBCC('bcc@example.com'); //$mail->addAttachment('/var/tmp/file.tar.gz'); $mail->isHTML(true); if(isset($_FILES['file'])) $mail->addAttachment($_FILES['file']['tmp_name'], $_FILES['file']['name']); // Optional name$mail->isHTML(true); $mail->Subject = ''; $mail->Body = '' .$name . ' ,' .$comment. '<br>: ' .$email.'<br>' .$text; $mail->AltBody = ''; if(!$mail->send()) { echo 'Error'; } else { header('location: thank-you.html'); } ?>
... View more